package com.rainng.coursesystem.module.custom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rainng.coursesystem.module.custom.dto.request.CustomQueryReqDTO;
import com.rainng.coursesystem.module.custom.dto.response.CustomResDTO;
import com.rainng.coursesystem.module.custom.entity.Custom;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomMapper extends BaseMapper<Custom> {

    IPage<CustomResDTO> paging(Page toPage, @Param("query") CustomQueryReqDTO params);

    IPage<CustomResDTO> pagingByGroup(Page toPage, @Param("query")CustomQueryReqDTO params);

    IPage<CustomResDTO> pagingByPerson(Page toPage,@Param("query") CustomQueryReqDTO params);

    List<String> getCustomIdByCustomName(String name);

    List<String> getCompanyNameByUserName(String username);
    List<CustomResDTO> getUserByCustomer(String customerId);
}
